<template>
  <n-tabs type="line" animated>
    <n-tab-pane v-for="item in tabPane" :key="item.name" :name="item.name" :tab="item.tab">
      <component :is="item.component" />
    </n-tab-pane>
  </n-tabs>
</template>

<script lang="ts" setup>
import JSONEditor from "./components/JSONEditor/index.vue";
import ExcelToJSON from "./components/ExcelToJSON/index.vue";
import JSONToExcel from "./components/JSONToExcel/index.vue";

const tabPane = [
  {
    name: "JSONEditor",
    tab: "JSON编辑器",
    component: JSONEditor,
  },
  {
    name: "ExcelToJSON",
    tab: "Excel转JSON",
    component: ExcelToJSON,
  },
  {
    name: "JSONToExcel",
    tab: "JSON转Excel",
    component: JSONToExcel,
  },
];
</script>


